package oop多态作业;

public class Rectangle  extends  Graph{
    public Rectangle(int length, int width) {
        super(length, width);
    }

    public  void area(){
        System.out.print(
                "此长方形的面积为"
        );
        System.out.print(super.getWidth()*super.getLength()+"\t");
    }
    public void perimeter(){
        System.out.print("此长方形的周长为");
        System.out.println((super.getWidth()+super.getLength())*2);
    }
}
